// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
//导入代码高亮文件
import hljs from 'highlight.js'
//导入代码高亮样式
import 'highlight.js/styles/monokai-sublime.css'
// bpmn 工作流绘图工具的样式
import "bpmn-js/dist/assets/diagram-js.css"  // 左边工具栏以及编辑节点的样式
import "bpmn-js/dist/assets/bpmn-font/css/bpmn.css"
import "bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css"
import "bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css"

//自定义一个代码高亮指令
Vue.directive('highlight',function (el) {let highlight = el.querySelectorAll('pre code');highlight.forEach((block)=>{hljs.highlightBlock(block)})
})
import * as THREE from 'three'
// import {fetch, patch, post, put} from './util/http.js'
import http from './util/http.js'
import token from './util/token.js'

Vue.config.productionTip = false
Vue.use(ElementUI);
//定义全局变量
// Vue.prototype.$post = post
// Vue.prototype.$fetch = fetch
// Vue.prototype.$patch = patch
Vue.prototype.$http = http
Vue.prototype.$token = token
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  render: h => h(App)
})

